﻿namespace A3;

public class ShapeFactory
{
    private static Random random = new Random();

    public static IShape CreateRandomShape()
    {
        int shapeType = random.Next(1, 4);

        switch (shapeType)
        {
            case 1:
                return new Rectangle(random.Next(1, 10), random.Next(1, 10));
            case 2:
                return new Square(random.Next(1, 10));
            case 3:
                double side = random.Next(1, 10);
                return new Triangle(side, side, side);
        }

        throw new NotImplementedException();
    }
}